<!DOCTYPE HTML>
<html>
<head>
    {include file="common:meta"}
</head>
<body>
<div class="page-container">
    <div class="ibox-content">
                <form class="form-horizontal" id="form" data-url="/MenuEditPost">
                    <div class="form-group">
                        <label for="input-parent_id" class="col-sm-2 control-label"><span class="form-required">*</span>上级</label>
                        <div class="col-md-6 col-sm-10">
                            <select class="form-control" name="parent_id" id="input-parent_id">
                                <option value="0">作为一级菜单</option>
                                {$select_category|raw}
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="input-name" class="col-sm-2 control-label"><span
                                class="form-required">*</span>名称</label>
                        <div class="col-md-6 col-sm-10">
                            <input type="text" class="form-control" id="input-name" name="name" value="{$data.name}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="input-app" class="col-sm-2 control-label"><span
                                class="form-required">*</span>应用</label>
                        <div class="col-md-6 col-sm-10">
                            <input type="text" class="form-control" id="input-app" name="app" value="{$data.app}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="input-controller" class="col-sm-2 control-label"><span
                                class="form-required">*</span>控制器</label>
                        <div class="col-md-6 col-sm-10">
                            <input type="text" class="form-control" id="input-controller" name="controller" value="{$data.controller}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="input-action" class="col-sm-2 control-label"><span class="form-required">*</span>方法</label>
                        <div class="col-md-6 col-sm-10">
                            <input type="text" class="form-control" id="input-action" name="action"
                                   value="{$data.action}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="input-param" class="col-sm-2 control-label">参数</label>
                        <div class="col-md-6 col-sm-10">
                            <input type="text" class="form-control" id="input-param" name="param" value="{$data.param}">
                            <p class="help-block">例:id=3&amp;p=3</p>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="input-route" class="col-sm-2 control-label">
                            <span class="form-required">*</span>
                            路由
                        </label>
                        <div class="col-md-6 col-sm-10">
                            <input type="text" class="form-control" id="input-route" name="route"
                                   value="{$data.route}">
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="input-status" class="col-sm-2 control-label">状态</label>
                        <div class="col-md-6 col-sm-10" >
                            <select class="form-control" name="status" id="input-status">
                                <option value="1">在左侧菜单显示</option>
                                {php}$status_selected=empty($data['status'])?"selected":"";{/php}
                                <option value="0" {$status_selected}>在左侧菜单隐藏</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="input-type" class="col-sm-2 control-label">类型</label>
                        <div class="col-md-6 col-sm-10">
                            <select class="form-control" name="type" id="input-type">
                                <option value="1">有界面可访问菜单</option>
                                {php}$type2_selected=$data['type']==2?"selected":"";{/php}
                                <option value="2">无界面可访问菜单</option>
                                {php}$type_selected=$data['type']==0?"selected":"";{/php}
                                <option value="0" {$type_selected}>只作为菜单</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-offset-2 col-sm-10">
                            <input type="hidden" name="id" value="{$data.id}"/>
                            <button class="btn btn-primary" type="button" onclick="commonSubmit(this)">提交</button>
                            <button class="btn btn-default" type="button" onclick="commonClose()">关闭</button>
                        </div>
                    </div>
                </form>
    </div>
</div>
    {include file="common:footer"}
<script>

</script>
</body>
</html>